package cn.exrick.manager.mapper;

import cn.exrick.manager.pojo.TbNews;
import cn.exrick.manager.pojo.TbNewsExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TbNewsMapper {
    long countByExample(TbNewsExample example);

    int deleteByExample(TbNewsExample example);

    int deleteByPrimaryKey(Long id);

    int insert(TbNews record);

    int insertSelective(TbNews record);

    List<TbNews> selectByExampleWithBLOBs(TbNewsExample example);

    List<TbNews> selectByExample(TbNewsExample example);

    TbNews selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") TbNews record, @Param("example") TbNewsExample example);

    int updateByExampleWithBLOBs(@Param("record") TbNews record, @Param("example") TbNewsExample example);

    int updateByExample(@Param("record") TbNews record, @Param("example") TbNewsExample example);

    int updateByPrimaryKeySelective(TbNews record);

    int updateByPrimaryKeyWithBLOBs(TbNews record);

    int updateByPrimaryKey(TbNews record);

    int cancelTop();

    List<TbNews> selectByCondition(@Param("record")TbNews tbNews,@Param("orderCol") String orderCol,@Param("orderDir") String orderDir);

    TbNews getNewsById(Long id);
}